<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+ 后台主题UI框架 - Bootstrap3 Markdown编辑器</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="../../static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="../../static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="../../static/css/animate.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../../static/css/plugins/markdown/bootstrap-markdown.min.css" />
    <link href="../../static/css/style.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <script src="../../static/js/commonrequest.js"></script>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-lg-5">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>病理信息查询</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="interface_wanda_pushfile2.html.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form role="form" class="form-horizontal m-t"  id="inputForm" target="_self">
                        <div class="clearfix"></div>
                        <div class="form-group ">
                            <label class="col-sm-3 control-label">病理号：</label>
                            <div class="col-sm-4">
                                <input type="text" id="pathNo" value="" name="pathNo" class="form-control" required=""  placeholder="样式:12-0001">
                                <span class="help-block m-b-none"></span>
                            </div>
                            <input type="hidden" name="pathHidden" value="" id="pathHidden"/>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary" id="submitSearch" >查询</button>
                                <button class="btn btn-white" id="clear1" >清空</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>病理信息推送json</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_editors.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                      <pre id="toastrOptions" contenteditable="" name="content" data-provide="markdown" rows="25">
{
    "patient_id":"40765203",
    "patient_master_id":"39bef3f0-1f10-4495-ae67-ea00d71d9907",
    "patient_class":"02",
    "wdbz":"0",
    "med_rec_no":"112233",
    "out_patient_no":"112233",
    "in_patient_no":"1122344445",
    "JZLSH":"",
    "order_uid":"",
    "organization_id":"42507230900",
    "organization_name":"上海交通大学医学院附属 上海儿童医学中心",
    "placer_order_no":"4566667",
    "pathological_number":"",
    "project_id":"01",
    "project_text":"",
    "procedure_id":"",
    "procedure_name":"-",
    "send_doctor_id":"",
    "send_doctor_name":"",
    "send_doctor_phone":"",
    "send_dept_id":"",
    "send_dept_name":"",
    "send_date":"2019-12-18 00:00:00",
    "send_organization_id":"42507230900",
    "send_organization_name":"上海交通大学医学院附属 上海儿童医学中心",
    "symptom":"",
    "adverse_reaction":"",
    "clinic_diagnosis":"",
    "surgery_info":"",
    "relevant_clinical_info":"",
    "collector_id":"",
    "collector_name":"",
    "collection_dept":"",
    "collection_method":"",
    "collection_volume":"",
    "collection_date":"",
    "specimen_received_date":"",
    "specimen_received_id":"",
    "specimen_received_name":"",
    "result_status":"报告已发布",
    "result_status_code":"4040",
    "reg_time":"2019-12-18 00:00:00",
    "register_id":"",
    "register_name":"",
    "based_time":"2019-12-18 00:00:00",
    "based_id":"",
    "based_name":"何巧",
    "based_record_id":"",
    "based_record_name":"",
    "autopsy":"右颞叶占位病变\n 灰褐灰白色组织一块，4*3.5*1.5厘米，切面灰白灰褐色，质中。",
    "production_time":"",
    "production_id":"",
    "production_name":"",
    "result_assistant_time":"2019-12-27 00:00:00",
    "result_assistant_id":"3272",
    "result_assistant_name":"张忠德",
    "result_principal_id":"3272",
    "result_principal_time":"2019-12-31 16:30:37",
    "result_principal_name":"张忠德",
    "abnormal_flags":"",
    "critical_value":"",
    "scopically_seen":"",
    "pathological_diagnosis":"（右颞叶）送检脑组织，局部水肿，局部神经元轻度增生。部分小血管壁增厚。小灶钙化。\r\n\r\n请结合临床。",
    "tumor_classification":"",
    "cancer_classification":"",
    "cancer_staging":"",
    "ObservationUID":""
}
                        </pre>
                    <div class="clearfix"></div>
                    <br>
                    <div class="form-group ">
                        <div class="col-sm-12 col-sm-offset-4">
                            <button class="btn btn-primary" id="submit1">提交</button>
                            <button class="btn btn-white" id="reset" type="submit">重置</button>
                        </div>
                    </div>
                    <br>
                </div>
            </div>
            <div class="ibox-content">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>接口返回信息</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="form_editors.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="clearfix"></div>
                        <div class="row m-t-lg">
                            <div class="col-lg-12">
                                <pre id="toastrOptions1" class="p-m"></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="ibox-content">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>接口请求信息</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="form_editors.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group ">
                            <div class="col-sm-12 col-sm-offset-4">
                                <button class="btn btn-white" id="clear2" type="submit">清空</button>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                        <div class="row m-t-lg">
                            <div class="col-lg-12">
                                <pre id="toastrOptions2" class="p-m"></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="ibox-content">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>接口请求信息解密</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="form_editors.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group ">
                            <div class="col-sm-12 col-sm-offset-4">
                                <button class="btn btn-white" id="clear3" type="submit">清空</button>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                        <div class="row m-t-lg">
                            <div class="col-lg-12">
                                <pre id="toastrOptions3" class="p-m"></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../../static/js/jquery.min.js?v=2.1.4"></script>
<script src="../../static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="../../static/js/content.min.js?v=1.0.0"></script>
<script type="text/javascript" src="../../static/js/plugins/markdown/markdown.js"></script>
<script type="text/javascript" src="../../static/js/plugins/markdown/to-markdown.js"></script>
<script type="text/javascript" src="../../static/js/plugins/markdown/bootstrap-markdown.js"></script>
<script type="text/javascript" src="../../static/js/plugins/markdown/bootstrap-markdown.zh.js"></script>
<script src="../../static/js/jquery-ui-1.10.4.min.js"></script>
<script src="../../static/js/plugins/beautifyhtml/beautifyhtml.js"></script>
<script src="../../static/js/plugins/validate/jquery.validate.min.js"></script>
<script src="../../static/js/plugins/validate/messages_zh.min.js"></script>
<script src="../../static/js/demo/form-validate-demo.js"></script>
<script type="text/javascript">
    $("#inputForm").validate(
        {
            rules:{pathNo:"required"},
            submitHandler: function () {
                var pathNo = $("#pathNo").val();
                if(pathNo==""||pathNo.length==0){
                    return false;
                }else{
                    var params={"pathNo":pathNo};
                    //根据病理号查询患者信息，以json样例显示
                    $.ajax({
                        type: "POST",
                        url: '/langjiaInterface/getMedicalInfoByPathNo',
                        data: JSON.stringify(params),
                        dataType:'json',
                        contentType:"application/json;charset=UTF-8",
                        contentType: "application/json; charset=UTF-8",
                        beforeSend: function (XMLHttpRequest) {
                            XMLHttpRequest.setRequestHeader("Authorization", handleLocalStorage('get', 'Authorization'));
                        },
                        success: function(data){
                            if(data.code==200){
                                var details=data.data;
                                details = JSON.stringify(details, null, 2);//将字符串转换成json对象
                                document.getElementById('toastrOptions').innerText= details;
                            }else{
                                alert("查询数据失败！"+data.msg);
                            }
                        },
                        error:function(){
                            alert("查询数据失败！");
                        }
                    });
                }
            }
        });

    $(function(){
        $('#clear1').click(function () {
            $('#pathNo').val("");
        });

        $("#submit1").click(function(){
            document.getElementById('toastrOptions2').innerText="";
            var toastrOptions =document.getElementById("toastrOptions").innerHTML;
            var toastrOptions=toastrOptions.replace(/(<br[^>]*>)/g,'')
            $.ajax({
                type: "POST",
                url: '/langjiaInterface/pushMedical',
                data: {"toastrOptions":toastrOptions},
                dataType:'json',
                beforeSend: function (XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader("Authorization", handleLocalStorage('get', 'Authorization'));
                },
                success: function(data){
                    var reqmedical=data.medicalInfo;
                    reqmedical = JSON.stringify(reqmedical, null, 2);//将字符串转换成json对象
                    document.getElementById('toastrOptions2').innerText= reqmedical;

                    var descmedical=data.rspmedicalInfo;
                    descmedical = JSON.stringify(descmedical, null, 2);//将字符串转换成json对象
                    document.getElementById('toastrOptions1').innerText= descmedical;

                    var rspmedical=data.descmedicalInfo;
                    rspmedical = JSON.stringify(rspmedical, null, 2);//将字符串转换成json对象
                    document.getElementById('toastrOptions3').innerText= rspmedical;

                },
                error:function(){
                    alert("推送失败！");
                }
            });
        });
        $('#clear2').click(function(){
            $('#toastrOptions2').html("");
        });
        $('#clear3').click(function(){
            $('#toastrOptions3').html("");
        });

        $('#reset').click(function(){
            $('#toastrOptions').html("{\n" +
                "    \"patient_id\":\"40765203\",\n" +
                "    \"patient_master_id\":\"39bef3f0-1f10-4495-ae67-ea00d71d9907\",\n" +
                "    \"patient_class\":\"02\",\n" +
                "    \"wdbz\":\"0\",\n" +
                "    \"med_rec_no\":\"112233\",\n" +
                "    \"out_patient_no\":\"112233\",\n" +
                "    \"in_patient_no\":\"1122344445\",\n" +
                "    \"JZLSH\":\"\",\n" +
                "    \"order_uid\":\"\",\n" +
                "    \"organization_id\":\"42507230900\",\n" +
                "    \"organization_name\":\"上海交通大学医学院附属 上海儿童医学中心\",\n" +
                "    \"placer_order_no\":\"4566667\",\n" +
                "    \"pathological_number\":\"\",\n" +
                "    \"project_id\":\"01\",\n" +
                "    \"project_text\":\"\",\n" +
                "    \"procedure_id\":\"\",\n" +
                "    \"procedure_name\":\"-\",\n" +
                "    \"send_doctor_id\":\"\",\n" +
                "    \"send_doctor_name\":\"\",\n" +
                "    \"send_doctor_phone\":\"\",\n" +
                "    \"send_dept_id\":\"\",\n" +
                "    \"send_dept_name\":\"\",\n" +
                "    \"send_date\":\"2019-12-18 00:00:00\",\n" +
                "    \"send_organization_id\":\"42507230900\",\n" +
                "    \"send_organization_name\":\"上海交通大学医学院附属 上海儿童医学中心\",\n" +
                "    \"symptom\":\"\",\n" +
                "    \"adverse_reaction\":\"\",\n" +
                "    \"clinic_diagnosis\":\"\",\n" +
                "    \"surgery_info\":\"\",\n" +
                "    \"relevant_clinical_info\":\"\",\n" +
                "    \"collector_id\":\"\",\n" +
                "    \"collector_name\":\"\",\n" +
                "    \"collection_dept\":\"\",\n" +
                "    \"collection_method\":\"\",\n" +
                "    \"collection_volume\":\"\",\n" +
                "    \"collection_date\":\"\",\n" +
                "    \"specimen_received_date\":\"\",\n" +
                "    \"specimen_received_id\":\"\",\n" +
                "    \"specimen_received_name\":\"\",\n" +
                "    \"result_status\":\"报告已发布\",\n" +
                "    \"result_status_code\":\"4040\",\n" +
                "    \"reg_time\":\"2019-12-18 00:00:00\",\n" +
                "    \"register_id\":\"\",\n" +
                "    \"register_name\":\"\",\n" +
                "    \"based_time\":\"2019-12-18 00:00:00\",\n" +
                "    \"based_id\":\"\",\n" +
                "    \"based_name\":\"何巧\",\n" +
                "    \"based_record_id\":\"\",\n" +
                "    \"based_record_name\":\"\",\n" +
                "    \"autopsy\":\"右颞叶占位病变\\n 灰褐灰白色组织一块，4*3.5*1.5厘米，切面灰白灰褐色，质中。\",\n" +
                "    \"production_time\":\"\",\n" +
                "    \"production_id\":\"\",\n" +
                "    \"production_name\":\"\",\n" +
                "    \"result_assistant_time\":\"2019-12-27 00:00:00\",\n" +
                "    \"result_assistant_id\":\"3272\",\n" +
                "    \"result_assistant_name\":\"张忠德\",\n" +
                "    \"result_principal_id\":\"3272\",\n" +
                "    \"result_principal_time\":\"2019-12-31 16:30:37\",\n" +
                "    \"result_principal_name\":\"张忠德\",\n" +
                "    \"abnormal_flags\":\"\",\n" +
                "    \"critical_value\":\"\",\n" +
                "    \"scopically_seen\":\"\",\n" +
                "    \"pathological_diagnosis\":\"（右颞叶）送检脑组织，局部水肿，局部神经元轻度增生。部分小血管壁增厚。小灶钙化。\\r\\n\\r\\n请结合临床。\",\n" +
                "    \"tumor_classification\":\"\",\n" +
                "    \"cancer_classification\":\"\",\n" +
                "    \"cancer_staging\":\"\",\n" +
                "    \"ObservationUID\":\"\"\n" +
                "}");
            $('#toastrOptions2').html("");
            $('#toastrOptions1').html("");
            $('#toastrOptions3').html("");
        });

    });
</script>
</body>

</html>
